package Date1205;
import java.util.Scanner;
public class Demo4 {
    //寻找整数
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n= sc.nextInt();
        int add=0;
        
        int[] arr = new int[n];
        for(int i=0;i<n;i++){
            arr[i] = sc.nextInt();
        }
        int m = sc.nextInt();
        for(int j=0;j<arr.length;j++){
            if(arr[j]==m){
                add++;
            }
        }
        if(add>0){
            System.out.println(add);
        }else{
            System.out.println(add-1);
        }
         
    }
}
